import express from "express";
import toasync from "express-async-handler";
import nunjucks from "nunjucks";

const app = express();
app.use(express.static("public"));

nunjucks.configure("views", {
  autoescape: true,
  express: app,
  watch: true,
});

app.get("/", (req, res) =>
  res.render("home.html")
);

const port = process.env.PORT || 3000

app.listen(port, () => console.log(`server started at: ${port}`));